<template>
	<view>
		<view class="order" v-for="(res, index) in orderList" :key="res.id">
			<view class="top">
				<view class="left">
					<u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon>
					<view class="store">{{ res.store }}</view>
					<u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon>
				</view>
			</view>
			<view class="item" v-for="(item, index) in res.goodsList" :key="index">
				<view class="left">
					<image :src="item.goodsUrl" mode="aspectFill"></image>
				</view>
				<view class="content">
					<view class="title u-line-2">{{ item.title }}</view>
					<view class="type">{{ item.type }}</view>
					<view class="delivery-time">发货时间 {{ item.deliveryTime }}</view>
				</view>
				<view class="right">
					<view class="price">
						￥
						<text class="decimal">555.02</text>
					</view>
					<view class="number">x{{ item.number }}</view>
				</view>
			</view>
			<view class="total">
				共2件商品 合计:
				<text class="total-price">
					￥
					<text class="decimal">66.00</text>
				</text>
			</view>
			<view class="bottoms">
			</view>
		</view>


		<view class="message">
			<view class="msg_zhu">
				<text class="zi1">退款原因</text>
				<view class="zi2"  @click="show = true">
					请选择退款原因
					<image src="../../../static/users/right.png" mode=""></image>
				</view>
			</view>

			

			<view class="msg_zhu">
				<text class="zi1">实付金额</text>
				<text class="zi3">
					￥ <text>1203</text>
				</text>
			</view>

			<view class="msg_zhu">
				<text class="zi1">满减抵扣</text>
				<text class="zi3">
					￥ <text>30</text>
				</text>
			</view>

			<view class="msg_zhu">
				<text class="zi1">退款金额</text>
				<text class="zi3">
					￥ <text>30</text>
				</text>
			</view>


			<view class="textarea">
				<textarea value="" maxlength="100" placeholder="请输入评论(100字)" />
			</view>

			<u-upload width="193" height="193" max-count="9" max-size="1024*7" image-mode="aspectFill" class="upload"
				ref="pick0" :action="action" :auto-upload="false" del-bg-color="#000" :file-list="fileList"></u-upload>
		</view>

        <u-select v-model="show" @confirm="confirm" :list="list"></u-select>
		
		<view class="bot">
			提交
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				action: 'http://www.example.com/upload',
				fileList: [],
				list: [{
						value: '1',
						label: '退款原因'
					},
					{
						value: '2',
						label: '退款原因'
					}
				],
				show:false,
				orderList: [{
					id: 3,
					store: '三星旗舰店',
					goodsList: [{
						goodsUrl: '//img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg',
						title: '三星（SAMSUNG）京品家电 UA65RUF70AJXXZ 65英寸4K超高清 HDR 京东微联 智能语音 教育资源液晶电视机',
						type: '4K，广色域',
						deliveryTime: '保质5年',
						price: '1998',
						number: 3
					}]
				}],
			}
		},
		methods: {
			confirm(e) {
				console.log(e);
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F2F4FA;
	}

	.order {
		width: 710rpx;
		background-color: #ffffff;
		margin: 20rpx auto;
		border-radius: 20rpx;
		box-sizing: border-box;
		padding: 20rpx 20rpx 0 20rpx;
		font-size: 28rpx;

		.top {
			display: flex;
			justify-content: space-between;

			.left {
				display: flex;
				align-items: center;

				.store {
					margin: 0 10rpx;
					font-size: 32rpx;
					font-weight: bold;
				}
			}

			.right {
				color: $u-type-warning-dark;
			}
		}

		.item {
			display: flex;
			margin: 20rpx 0 0;

			.left {
				margin-right: 20rpx;

				image {
					width: 200rpx;
					height: 200rpx;
					border-radius: 10rpx;
				}
			}

			.content {
				.title {
					font-size: 28rpx;
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 2;
					overflow: hidden;
					line-height: 50rpx;
					border-radius: 0;
				}

				.u-line-2 {
					width: 336rpx;
					height: 103rpx;
				}

				.type {
					margin: 10rpx 0;
					font-size: 24rpx;
					color: $u-tips-color;
				}

				.delivery-time {
					color: #e5d001;
					font-size: 24rpx;
				}
			}

			.right {
				margin-left: 10rpx;
				padding-top: 20rpx;
				text-align: right;

				.decimal {
					font-size: 24rpx;
					margin-top: 4rpx;
				}

				.number {
					color: $u-tips-color;
					font-size: 24rpx;
				}
			}
		}

		.total {
			margin-top: 20rpx;
			text-align: right;
			font-size: 24rpx;

			.total-price {
				font-size: 32rpx;
			}
		}

		.bottoms {
			display: flex;
			margin-top: 40rpx;
			padding: 0 10rpx;
			justify-content: space-between;
			align-items: center;

			.btn {
				line-height: 52rpx;
				width: 160rpx;
				border-radius: 26rpx;
				border: 2rpx solid $u-border-color;
				font-size: 26rpx;
				text-align: center;
				color: $u-type-info-dark;
			}

			.evaluate {
				color: $u-type-warning-dark;
				border-color: $u-type-warning-dark;
			}
		}
	}

	.message {
		margin: 0 auto;
		padding: 10rpx 39rpx 30rpx 41rpx;
		width: 710rpx;
		// height: 470rpx;
		background: #FFFFFF;
		border-radius: 30rpx;

		.textarea {
			margin-top: 28rpx;
			padding: 33rpx;
			width: 630rpx;
			height: 180rpx;
			background: #F2F4FA;
			border-radius: 30rpx;

			textarea {
				height: 114rpx;
			}
		}

		.msg_zhu {
			margin: 30rpx 0 0 0;
			width: 630rpx;
			height: 40rpx;
			position: relative;

			.zi1 {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #010101;
				line-height: 30rpx;
			}

			.zi2 {
				display: block;
				position: absolute;
				right: 0rpx;
				top: 0rpx;
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 300;
				color: #999999;
				line-height: 40rpx;

				image {
					margin-left: 15rpx;
					width: 9rpx;
					height: 16rpx;
				}
			}

			.zi3 {
				display: block;
				position: absolute;
				right: 0rpx;
				top: -15rpx;
				font-size: 20rpx;
				font-family: PingFang SC;
				font-weight: 300;
				color: #010101;
				line-height: 40px;

				text {
					font-size: 28rpx;
				}
			}
		}
	}

	.bot {
		margin: 111rpx 0 100rpx 30rpx;
		width: 690rpx;
		height: 100rpx;
		background: #181818;
		box-shadow: 0px 10rpx 40rpx 0px rgba(24, 24, 24, 0.26);
		border-radius: 50rpx;
		text-align: center;
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		line-height: 100rpx;
	}
</style>
